<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <script src="./promise.js"></script> -->
    <script>
      // 列出打印顺序
      function changeStuff(a, b, c) {
        a = a * 10
        b.item = 'changed'
        c = { item: 'changed' }
      }

      let num = 10
      let obj1 = { item: 'unchanged' }
      let obj2 = { item: 'unchanged' }

      changeStuff(num, obj1, obj2)
      console.log(num);
console.log(obj1.item);
console.log(obj2.item);
      //       let p1 = Promise.resolve('ok1')
      //       let p2 = Promise.resolve('ok2')
      //       let p3 = Promise.resolve('ok3')
      //       // let res = p.then((s) => {
      //       //   throw 'fail'
      //       //   // console.log(s)
      //       // })
      // // console.log(p);
      // let result = Promise.all([p1,p2,p3])
      // let res = p.catch(e=>{
      //   // console.log(e);
      //   return 'error'
      // })
      console.log(result)

      // console.log(res);
      // console.log(p);
    </script>
  </body>
</html>
